def func(s):
    al_num=0
    space_num=0
    digit_num=0
    others_num=0
    for i in s:
        if i.isdigit():
            digit_num+=1
        elif i.isspace():
            space_num+=1
        elif i.isalpha():
            al_num+=1
        else:
            others_num+=1
    return (al_num,space_num,digit_num,others_num)

result = func("asdsadjlk1212jdjakdk2  d d d d323233223下")
print(result)
result = func("  d d d d323233223下")
print(result)

def func(s,lis,tup):
    zifuchuan = len(s)
    liebiao = len(lis)
    yuanzu = len(tup)
    if zifuchuan>5:
        print("大于5")
    else:
        print("小于5")
    if liebiao>5:
        print("大于5")
    else:
        print("小于5")
    if yuanzu>5:
        print("大于5")
    else:
        print("小于5")
    return (zifuchuan,liebiao,yuanzu)

func('dadadad','[1,2,3]',{1,2,3})


def func(n):
    for i in n:
        i = str(i)
        if '' in i:
            return ('空格: ',i)
        else:
            return ('没空格')
a=('dasdsd dasd','ds')
res = func(a)
print(res)


def func(li):
    len_li = len(li)
    if len_li>2:
        print("列表长度大于2")
        new_li = li[0:2]
    return (new_li)
res = func([12,12,45,78,32,12])
print(res)

def func(li,tup):
    li = []
    tup = []
    for i in range(len(li)):
        if i %2 ==1:
            li.append(li[i])
    print(li)
    for j in range(len(tup)):
        if j %2 ==1:
            tup.append(tup[j])
    print(tup)
    return (li,tup)

res = func([1,2,3,4,5,6,7,8,9],(1,2,3,11,21,4,5,6,7))
print(res)


def func(strr):
    digit_number = 0
    space_number = 0
    alpha_number = 0
    else_number = 0
    for i in strr:
        if i.isdigit():
            digit_number += 1
        elif i.isspace():
            space_number += 1
        elif i.isalpha():
            alpha_number += 1
        else:
            else_number += 1
    return ("数字，空格，字母，其他内容分别有: ",(digit_number,space_number,alpha_number,else_number))

res = func('sda!@#$%^&1234567dfghj da da ')
print(res)